Skip to content

fix(windows): error on full index - use cmd.exe-compatible syntax (Fixes #324)#325

Closed
hippus wants to merge 1 commit into
DeusData:mainfrom
hippus:main
Closed

fix(windows): error on full index - use cmd.exe-compatible syntax (Fixes #324)#325
hippus wants to merge 1 commit into
DeusData:mainfrom
hippus:main

Conversation

@hippus

@hippus hippus commented May 8, 2026

Copy link
Copy Markdown
Contributor

Previously on full index under Windows there is an error after step 5: The filename, directory name, or volume label syntax is incorrect.
This PR fixes cmd.exe syntax

[1/9] Building file structure
  Extracting: N/N files (100%))
[2/9] Extracting definitions
[3/9] Building registry
[4/9] Resolving calls & edges
[5/9] Detecting tests
[7/9] Analyzing git history
[8/9] Linking config files
[9/9] Writing database

@hippus hippus changed the title fix(windows): use cmd.exe-compatible syntax fix(windows): error on full index - use cmd.exe-compatible syntax May 8, 2026
@hippus hippus changed the title fix(windows): error on full index - use cmd.exe-compatible syntax fix(windows): error on full index - use cmd.exe-compatible syntax (issue #324) May 8, 2026
@hippus hippus changed the title fix(windows): error on full index - use cmd.exe-compatible syntax (issue #324) fix(windows): error on full index - use cmd.exe-compatible syntax (Fixes #324) May 8, 2026
@DeusData DeusData added bug Something isn't working windows Windows-specific issues labels May 8, 2026
@DeusData

Copy link
Copy Markdown
Owner

Thank you, @hippus! 🙏 Clean diagnosis of a real Windows blocker (#324). You're exactly right: cd '%s' && ... 2>/dev/null is POSIX-shell syntax — cmd.exe doesn't understand single quotes and /dev/null isn't a valid path, which is what produced "The filename, directory name, or volume label syntax is incorrect" right at the git-history step of a full index. Switching to git -C "%s" ... 2>NUL is the correct cross-platform form (and git -C is more robust than cd && even on POSIX).

Since the PR branch predated the :%%ct commit-timestamp field that was added to the pretty-format string (temporal-properties work, #257), it no longer applied cleanly to main, so I distilled your fix onto current main with that field preserved and credited you as the commit author:

Landed in df38e33, which closes #324. Verified locally: build clean, all 3,617 tests pass (githistory pass runs fine). I also confirmed the double-quoted path is safe — cbm_validate_shell_arg rejects ", $, backtick and backslash before the command is built. Thanks for making Windows better! 🪟

DeusData pushed a commit that referenced this pull request May 30, 2026
The git-history popen command used `cd '%s' && git log ... 2>/dev/null`,
which fails on Windows cmd.exe: single quotes are not recognized and
/dev/null is not a valid path, producing "The filename, directory name,
or volume label syntax is incorrect" at the git-history step of a full
index. Switch to `git -C "%s" log ... 2>NUL` (POSIX: 2>/dev/null),
which is valid on both cmd.exe and POSIX shells. Double-quoting the path
is safe because cbm_validate_shell_arg already rejects ", $, backtick,
backslash and the other active metacharacters before the command is built.

Distilled from #325 onto current main (preserves the :%%ct commit-time
field added since the PR branch). Closes #324.
@DeusData DeusData closed this May 30, 2026
zaruous pushed a commit to zaruous/codebase-memory-mcp that referenced this pull request May 31, 2026
The git-history popen command used `cd '%s' && git log ... 2>/dev/null`,
which fails on Windows cmd.exe: single quotes are not recognized and
/dev/null is not a valid path, producing "The filename, directory name,
or volume label syntax is incorrect" at the git-history step of a full
index. Switch to `git -C "%s" log ... 2>NUL` (POSIX: 2>/dev/null),
which is valid on both cmd.exe and POSIX shells. Double-quoting the path
is safe because cbm_validate_shell_arg already rejects ", $, backtick,
backslash and the other active metacharacters before the command is built.

Distilled from DeusData#325 onto current main (preserves the :%%ct commit-time
field added since the PR branch). Closes DeusData#324.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working windows Windows-specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants